package org.xiaojl.modules.sys.entity;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import org.xiaojl.utils.ToolUtil;
import com.baomidou.mybatisplus.annotations.TableName;
import org.xiaojl.common.base.BaseEntity;

/**
 * <p>
 * 图片
 * </p>
 *
 * @author xiaojl
 * @since 2017-09-07
 */
@TableName("sys_picture")
public class SysPicture extends BaseEntity<SysPicture> {

    private static final long serialVersionUID = 1L;

    /**
     * 图片名称
     */
	private String name;
    /**
     * 图片类型，即后缀
     */
	private String type;
    /**
     * 图片来源路径
     */
	private String sourcePath;
    /**
     * 原图保存路径
     */
	private String savePath;
    /**
     * 缩略图路径
     */
	private String thumbnail;

	@Override
	public Wrapper<SysPicture> bindingQueryWrapper() {
		Wrapper<SysPicture> wrapper = new EntityWrapper<SysPicture>();
		if(ToolUtil.isNotEmpty(this.name)){
			wrapper.like("name", this.name);
		}
		if(ToolUtil.isNotEmpty(this.type)){
			wrapper.like("type", this.type);
		}
		if(ToolUtil.isNotEmpty(this.sourcePath)){
			wrapper.like("sourcePath", this.sourcePath);
		}
		if(ToolUtil.isNotEmpty(this.savePath)){
			wrapper.like("savePath", this.savePath);
		}
		if(ToolUtil.isNotEmpty(this.thumbnail)){
			wrapper.like("thumbnail", this.thumbnail);
		}
		return wrapper;
	}


	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getSourcePath() {
		return sourcePath;
	}

	public void setSourcePath(String sourcePath) {
		this.sourcePath = sourcePath;
	}

	public String getSavePath() {
		return savePath;
	}

	public void setSavePath(String savePath) {
		this.savePath = savePath;
	}

	public String getThumbnail() {
		return thumbnail;
	}

	public void setThumbnail(String thumbnail) {
		this.thumbnail = thumbnail;
	}

}
